<include file="Public:header"/>
<body data-tuktuk="boxes">
<include file="Public:left"/>
<include file="Public:aside"/>
    <section>
        <include file="Public:nav" />
        <hr />
        <article class="padding scroll">
            <div class="margin-bottom">
                <h4 class="text book inline">基本资料</h4>
                <div class="on-right">
                    <a href="{:U('Admin/Func/index')}" class="text button small theme" >功能模块</a>
                </div>
            </div>            
            <hr />
            <form name="form" method="post" action="{:U('Admin/AppInfo/update')}" class="margin form-validate">
                <fieldset>
                    <label>标题:<small>将作为APP名称和主页名称</small></label>
                    <input type="text" name="name" data-rule-required="true" value="{$appinfo.title}">
                </fieldset>

                <fieldset>
                    <label>标志:<small>公司标志或默认图片</small></label>
                    <input class="webupload" type="text" name="logo" data-rule-required="true" value="{$appinfo.logo}">
                    <a data-fancybox-type="iframe" class="button small fancybox" href="{:U('Admin/FileManager/index')}#logo">上传</a>
                </fieldset>
                
                <fieldset>
                    <label>功能:<small>APP的功能介绍</small></label>
                    <textarea data-rule-required="true" name="intro">{$appinfo.intro}</textarea>
                </fieldset>
                <fieldset>
                    <label>名称:<small>公司或者团队名称</small></label>
                    <input type="text" data-rule-required="true" name="name" data-rule-required="true" value="{$appinfo.name}">
                </fieldset>
                <fieldset>
                    <label>介绍:<small>企业或者公司的信息</small></label>
                    <textarea data-rule-required="true" name="desc">{$appinfo.desc}</textarea>
                </fieldset>
                <fieldset>
                    <label>联系人:<small>将显示在联系我们页面</small></label>
                    <input type="text" data-rule-required="true" name="contact" value="{$appinfo.contact}" >
                </fieldset>
                <fieldset>
                    <label>联系电话:<small>作为一键拨号</small></label>
                    <input type="text" data-rule-required="true" name="tel" value="{$appinfo.tel}" >
                </fieldset>
                <fieldset>
                    <label>地址:<small>填写省 市 区 街道</small></label>
                    <input type="text" data-rule-required="true" name="addr" value="{$appinfo.addr}" >
                </fieldset>
                <button type="submit">保存</button>
            </form>
            
        </article>

        <footer class="bck dark text center">
            Powered by <a href="http://www.weiduniang.com" class="color theme text bold">Weiduniang</a>
        </footer>
    </section>
    
</body>
<load href="Public/js/app.js" />
<load href="Public/js/jquery.validation.min.js" />

<load href="Public/fancyBox/jquery.fancybox.css" />
<load href="Public/fancyBox/jquery.fancybox.min.js" />


<script type="text/javascript">
$(function(){
    $(".fancybox").fancybox({
        maxWidth    : 800,
        maxHeight   : 900,
        fitToView   : false,
        width       : '70%',
        height      : '70%',
        autoSize    : false,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none'
    });

    if ($('.form-validate').length > 0) {
        $('.form-validate').each(function() {
            var $obj = $(this);
            $obj.validate({
                // errorElement: 'span',
                // errorClass: 'help-block has-error',
                errorPlacement: function(error, element) {
                    $(element).attr('required','required');
                },
                highlight: function(label,element) {
                    $(element).attr('required','required');
                },
                success: function(label,element) {
                    $(element).removeAttr('required');
                },
                onkeyup: function(element) {
                    $(element).valid();
                },
                onfocusout: function(element) {
                    $(element).valid();
                }
            });
        });
    }
})    
</script>
</html>
